package mysql

import "gorm.io/gorm"

type House struct {
	gorm.Model
	HouseCity    string  `gorm:"type:varchar(50);not null;comment:'城市'"`
	HouseAddress string  `gorm:"type:varchar(50);not null;comment:'地址'"`
	HouseBuild   string  `gorm:"type:varchar(30);not null;comment:'楼栋号'"`
	HouseFloor   string  `gorm:"type:varchar(30);not null;comment:'楼层'"`
	HouseArea    int     `gorm:"type:varchar(500);not null;comment:'房屋面积'"`
	HousePrice   float64 `gorm:"type:decimal(10,2);not null;comment:'月租金'"`
	HouseAuthor  string  `gorm:"type:varchar(50);not null;comment:'房源描述'"`
	HouseStatus  int     `gorm:"type:tinyint(1);default:1;not null;comment:'房源状态:1-待上架 2-已上架 3-已出租'"`
}

type User struct {
	gorm.Model
	Mobile      string `gorm:"type:varchar(10);not null;comment:'用户名'"`
	Name        string `gorm:"type:varchar(10);not null;comment:'姓名'"`
	IdCord      string `gorm:"type:varchar(50);not null;comment:'身份证号'"`
	IdCordFront string `gorm:"type:varchar(500);not null;comment:'身份证正面图片地址'"`
	IdCordBack  string `gorm:"type:varchar(500);not null;comment:'身份证反面图片地址'"`
	UserStatus  int    `gorm:"type:tinyint(1);default:1;not null;comment:'用户状态:0-待审核 1-审核通过 2-审核未通过'"`
}
